
/****** Object:  StoredProcedure [dbo].[Report_R_Project]    Script Date: 06/27/2012 23:17:56 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[Report_R_Project]

AS
	SET NOCOUNT ON;		
	
	SELECT P.id, 
		   P.nombre, 
		   Count (P.id) NRecursos
	FROM   LineaTiempo LT 
		   INNER JOIN proyecto P 
				   ON LT.proyectoid = P.id 
	GROUP  BY p.id, 
			  p.nombre 		
	SET NOCOUNT OFF;
GO

